package com.erp.remote.purchase;

import com.erp.util.AjaxResult;
import com.erp.util.AmountDTO;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author :qinya
 * @PackageName:com.erp.remote.purchase
 * @ClassName: SourceOrderRemote
 * @Description: TODO
 * @date : 2025/7/19,11:41
 */
@RequestMapping("/sourceOrder")
public interface SourceOrderRemote {

    /**
     * 根据公司id查询采购退货单
     * 公司id+供应商id+购货退货单已审核+未全部核销+没有逻辑删除+搜索条件
     * 搜索条件：编号+日期+备注
     *
     * @param companyId
     * @return
     */
    @GetMapping("/find")
    AjaxResult findPurchaseSourceOrderByProviderId(@RequestParam("companyId") Integer companyId, @RequestParam(value = "searchValue", defaultValue = "") String searchValue,
                                                   @RequestParam(value = "providerId") Integer providerId);


    @PostMapping("/edit")
    AjaxResult editPurchaseSourceOrderByCode(@RequestBody List<AmountDTO> amountDTOList, @RequestParam("companyId") Integer companyId);

}
